package cn.amos.common.response;

import com.google.gson.Gson;

import java.io.Serializable;

/**
 * @author DaoyuanWang
 */
public class GenericResponse<T> implements Serializable {
    private static final long serialVersionUID = -8474125458912661164L;

    private Boolean status;
    private String code;
    private String message;
    private T body;

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public T getBody() {
        return body;
    }

    public void setBody(T body) {
        this.body = body;
    }

    @Override
    public String toString() {
        return new Gson().toJson(this);
    }
}
